<?php
	include "../controller/ConectBanco.php";
    include "../controller/Sessao.php";
	
	if($_SESSION["login"] != "admin"){
		header("location:../view/Principal.php");
	}
	
	$idUsuario = $_GET["idUsuario"];
?>	

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lt8"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7 lt8"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8 lt8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="UTF-8" />
        <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  -->
        <title>Cadastro Ponto</title>
        <link rel="stylesheet" type="text/css" href="../css/style.css" />
		<link rel="stylesheet" type="text/css" href="../css/demo.css" />
    </head>
    <body>
        <div class="container">
           <?php
				include "MenuAdmin.php";
				Menu::data();
				Menu::menuAdmin(); 
			?>
            <header>
                <h1>LOCALIZAGORA<span></br>Sistema de rastreamento via satelite </span></h1>
				
            </header>
            <section>				
                <div id="container_demo" >
                  
                    <div id="wrapper">
                        <div id="login" class="animate form">
                            <form  action="../controller/CadastrarPonto.php" method="post" autocomplete="on" > 
                                <h1>Cadastro Ponto</h1> 
                               
                                <p> 
                                    <label for="idUsuario" class="idUsuario"  > idUsuario : </label>
                                    <?php echo "$idUsuario"?>
                                    <input name="idUsuario" value="<?php echo "$idUsuario"?>" hidden>
                                </p>
                                 <p> 
									<label for="idDevice" class="idDevice"  > IdDevice -IMEI </label>
                                    <select name="idDevice" required="required">
										<option></option>
										<?php 
											$query = mysql_query("SELECT idDevice,imei FROM device  ");
											while($array = mysql_fetch_array($query)){
												echo "<option value='".$array['idDevice']."'>". $array['idDevice']." - ".$array['imei'] ."</option>";
											}
										?>
									</select> 
                                </p>
                                 <p> 
                                 	<label for="tipo" class="tipo"  > Tipo </label>
                                     <select name="tipo" required="required">
										<option></option>
										<option value="carro">Carro</option>
										<option value="moto">Moto</option>
										<option value="maquina">Maquina</option>
										<option value="pessoa">Pessoa</option>
										<option value="crianca">Crianca</option>
										<option value="crianca">Animal</option>
										<option value="outro">outro</option>
									</select> 
                                </p>
                                <p> 
                                    <label for="nomePonto" class="nomePonto"  > Nome </label>
                                    <input id="nomePonto" name="nomePonto" required="required" type="text" placeholder="nome ponto"/>
                                </p>
                                
                                 <p> 
                                    <label for="info" class="info"  > Informacao </label>
                                    <input id="info" name="info" required="required" type="text" placeholder="Informacao ponto"/>
                                </p>                
													
                               <br><br>
                                <p class="button"> 
                                    <input type="submit" value="cadastrar" /> 
								</p>
                                
                            </form>
                        </div>

                        
						
                    </div>
                </div>  
            </section>
        </div>
    </body>
</html>
